package com.vhall.component.entity.exam;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * @author yongzheng.xu
 */
@Data
@TableName("exams")
public class ExamEntity implements Serializable {

    private static final long serialVersionUID = 5190654267547766660L;

    @TableId(value = "exam_id", type = IdType.INPUT)
    @JsonProperty("exam_id")
    private Integer examId;


    @TableField("title")
    @JsonProperty("title")
    private String title;

    @JsonProperty("desc")
    @TableField("`desc`")
    private String desc;

    @TableField("extend")
    @JsonProperty("extend")
    private String extend;

    /**
     * 用户id
     */
    @TableField("account_id")
    @JsonProperty("account_id")
    private Integer accountId;

    /**
     * 是否是公开考卷，1是0否，默认是
     */
    @TableField("is_public")
    @JsonProperty("is_public")
    private Integer isPublic;


    /**
     * 来源id
     */
    @TableField("source_id")
    @JsonProperty("source_id")
    private String sourceId;

    /**
     * 试卷总分
     */
    @TableField("score")
    private Integer score;

    /**
     * 试题数量
     */
    @TableField("question_num")
    @JsonProperty("question_num")
    private Integer questionNum;

    /**
     * 考试限时时长 默认0 为不限时
     */
    @TableField("limit_time")
    @JsonProperty("limit_time")
    private Integer limitTime;

    /**
     * '试卷类型 0：试卷库 1:考试
     */
    @TableField("type")
    private Integer type;

    @TableField("created_at")
    @JsonProperty("created_at")
    private LocalDateTime createdAt;

    @TableField("updated_at")
    @JsonProperty("updated_at")
    private LocalDateTime updatedAt;

    @JsonIgnore
    @TableField("deleted_at")
    private LocalDateTime deletedAt;

}
